package cn.ad.server.web.spring.model.adview;

import cn.ad.server.domain.enumration.ActionType;

import java.util.HashMap;
import java.util.Map;

/**
 * @author dongbin.yu
 * @from 2016-08-05
 * @since V1.0
 */
public enum AdViewActionType {

    UNKNOWN(0,ActionType.UNKNOWN),
    LINK_JUMP(1,ActionType.LINK_JUMP),
    APP_DOWNLOAD(2, ActionType.APP_DOWNLOAD);

    private int value;
    private ActionType actionType;

    public final static Map<ActionType, Integer> FORMAT_MAP = new HashMap<>();

    static {
        for (AdViewActionType adViewActionType : values()) {
            FORMAT_MAP.put(adViewActionType.actionType, adViewActionType.value);
        }
    }

    AdViewActionType(int value, ActionType actionType) {
        this.value = value;
        this.actionType = actionType;
    }

}
